import 'dart:convert';
import 'package:app/config/ServiceUlr.dart';
import 'package:app/service/serviee_method.dart';
import 'package:flutter/material.dart';

class LoginModel with ChangeNotifier{
bool flag=false;
  Future<bool> getHttpData(name,num,ps) async{
    Map<String,String> map=Map();
    map.putIfAbsent("companyCode",(){
      return name;
    });
    map.putIfAbsent("userCode",(){
      return num;
    });
    map.putIfAbsent("password",(){
      return ps;
    });
    await getHttpPost(servicePath["login"], map).then((value){
      var data=json.decode(value.toString());
      var success= data["success"];
      flag=success;
    });
    notifyListeners();
    return flag;

  }
}